package com.yztstudy.Controller;

import com.yztstudy.Service.CarouselService;
import com.yztstudy.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 轮播图的表示层
 */

@RestController
@RequestMapping("/carousel")
public class CarouselController {

    @Autowired
    private CarouselService carouselService;


    /**
     * TODO 查询优先级最高的6条记录
     * @return
     */
    @PostMapping("/list")
    public R list()
    {
        return carouselService.list();
    }
}
